<?php

if(!defined("INDEX"))
    die;

if(!check_get('id') || !valid_id($_GET['id']))
    throw new HackException();

if($user->access < 0)
    throw new HackException();

// ----------------------------------------------------------------------------

$release = null;

try {

    $release = Release::getById($_GET['id']);

} catch (Exception $e) {

}

if(!($release instanceof Release))
    throw new Exception(_('Sorry, no such release.'));

$smarty->assign('release', $release);

$rt = new RecordTypeList;

$smarty->assign('record_types', $rt->getAllRecordTypes());